Skip to content

Conversation

@brendt
Copy link
Member

@brendt brendt commented May 22, 2025

No description provided.

@brendt brendt changed the title feat(database): support multiple connections in migrations and query builders feat(database): support multiple databases in migrations and query builders May 22, 2025
@brendt brendt requested a review from innocenzi May 22, 2025 18:26
@brendt
Copy link
Member Author

brendt commented May 22, 2025

@innocenzi I'd appreciate your input. I've left some clarification comments, and I'm aware there still are some todos

Copy link
Member

@innocenzi innocenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty cool to see that we got to about the same conclusions, this looks a lot like my local changes 😼

I don't think having a UsesDatabase trait is that useful, its only purpose is to store a database variable with an awkward name that can conflict with internal properties.

I would go with a onDatabase method on the Query, and pass down Database instances from the query builders to the Query instance they create.

As for the BuildsQuery class, I think the name is fine as-is: it describes the intent of the interface very well, and the current QueryBuilder class is a builder class for building queries

@brendt brendt merged commit 24ba164 into main May 23, 2025
65 checks passed
@innocenzi innocenzi deleted the multi-db-connections branch May 23, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants